package net.sycu.wj.ems.common;

import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class MyConst {
	private static final String DATEMIN = "2000-01-01";
	private static final String DATEMAX = "2050-01-01";
	private static final String DATETIMEMIN = "2000-01-01 00:00:00";
	private static final String DATETIMEMAX = "2050-01-01 00:00:00";

	public static java.sql.Date SQLDATENOW = null;
	public static java.sql.Date SQLDATEMIN = null;
	public static java.sql.Date SQLDATEMAX = null;
	
	public static java.util.Date UTILDATENOW = null;
	public static java.util.Date UTILDATEMIN = null;
	public static java.util.Date UTILDATEMAX = null;
	
	public static java.sql.Timestamp TIMESTAMPNOW = null;
	public static java.sql.Timestamp TIMESTAMPMIN = null;
	public static java.sql.Timestamp TIMESTAMPMAX = null;
	
	static{
		SimpleDateFormat dateFormate = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		
		SQLDATENOW = new java.sql.Date(System.currentTimeMillis());
		SQLDATEMIN = java.sql.Date.valueOf(DATEMIN);
		SQLDATEMAX = java.sql.Date.valueOf(DATEMAX);
		
		UTILDATENOW = new java.util.Date(System.currentTimeMillis());
		try {
			UTILDATEMIN = dateFormate.parse(DATETIMEMIN);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		try {
			UTILDATEMAX = dateFormate.parse(DATETIMEMAX);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		
		TIMESTAMPNOW = new java.sql.Timestamp(System.currentTimeMillis());
		TIMESTAMPMIN = java.sql.Timestamp.valueOf(DATETIMEMIN);
		TIMESTAMPMAX = java.sql.Timestamp.valueOf(DATETIMEMAX);
		
	}
}
